<html>
<head><meta charset="utf-8"><title>Pull crate source · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html">Pull crate source</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210625636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625636">(Sep 19 2020 at 17:26)</a>:</h4>
<p>Is there a cargo command for only pulling a crates source? Like <code>vendor</code> but for an arbitrary remote target or <code>install</code> but without the build step?</p>



<a name="210625746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625746">(Sep 19 2020 at 17:29)</a>:</h4>
<p>I usually just use <code>cargo vendor</code> or my own <a href="https://crates.io/crates/cargo-clone-crate"><code>cargo clone</code></a> command.</p>



<a name="210625834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625834">(Sep 19 2020 at 17:31)</a>:</h4>
<p>But say I don’t have any of the code installed on my machine. Can I still use <code>vendor</code> To pull that source?</p>



<a name="210625882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625882">(Sep 19 2020 at 17:32)</a>:</h4>
<p><code>vendor</code> will download whatever is needed</p>



<a name="210625886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625886">(Sep 19 2020 at 17:32)</a>:</h4>
<p>Right, but from nothing?</p>



<a name="210625902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625902">(Sep 19 2020 at 17:33)</a>:</h4>
<p>it needs a <code>Cargo.toml</code> right?</p>



<a name="210625907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625907">(Sep 19 2020 at 17:33)</a>:</h4>
<p>maybe I don't understand, like in an empty directory, you want to download "foo"?</p>



<a name="210625913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625913">(Sep 19 2020 at 17:33)</a>:</h4>
<p>also the link you sent seems like what I want</p>



<a name="210625923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625923">(Sep 19 2020 at 17:33)</a>:</h4>
<p>In that case, I would use something like <code>cargo clone log:0.4.11</code>, which will just download the log crate file.</p>



<a name="210625924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625924">(Sep 19 2020 at 17:33)</a>:</h4>
<p>Say I have no rust code at all on my machine</p>



<a name="210625965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625965">(Sep 19 2020 at 17:34)</a>:</h4>
<p>can I vendor an arbitrary crate?</p>



<a name="210625981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625981">(Sep 19 2020 at 17:34)</a>:</h4>
<p>like, I’m in an empty directory and run <code>cargo vendor</code></p>



<a name="210625990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210625990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210625990">(Sep 19 2020 at 17:34)</a>:</h4>
<p><code>cargo vendor</code> needs a manifest, and will download all dependencies. You can create a temporary manifest</p>



<a name="210626026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210626026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210626026">(Sep 19 2020 at 17:36)</a>:</h4>
<p>Ok, yeah, that answers my question</p>



<a name="210635189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210635189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210635189">(Sep 19 2020 at 21:02)</a>:</h4>
<p>Thank you!</p>



<a name="210684075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210684075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210684075">(Sep 20 2020 at 20:34)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> Hey, Thanks again for your help and linking me to your repo. I opened a pull request with a few small changes there which I was able to use to unblock my use case in <code>cargo-raze</code>. <a href="https://github.com/ehuss/cargo-clone-crate/pull/1">https://github.com/ehuss/cargo-clone-crate/pull/1</a></p>



<a name="210684099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210684099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210684099">(Sep 20 2020 at 20:34)</a>:</h4>
<p>Do you think you'd be able to review my changes? <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="210886705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/210886705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#210886705">(Sep 22 2020 at 15:24)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> Wait, I missed your message about <code>cargo clone log:0.4.11</code> I don't see any reference to a <code>clone</code> command anywhere :(</p>



<a name="211073331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/211073331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#211073331">(Sep 23 2020 at 23:13)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> Just pinging this thread <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="211073370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/211073370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#211073370">(Sep 23 2020 at 23:14)</a>:</h4>
<p><span class="user-mention" data-user-id="343063">@UebelAndre</span> I will get to it when I have time.  It may be at least a few days.</p>



<a name="211073476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Pull%20crate%20source/near/211073476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> UebelAndre <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Pull.20crate.20source.html#211073476">(Sep 23 2020 at 23:15)</a>:</h4>
<p>Yay! Thank you so much <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span> </p>
<p>I was most interested in knowing if you were open to the idea of a PR to your repo. So take your time, but it would help out a lot whenever you get the time <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>